<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="box">
    <input type="button" value="添加" @click="add">
    <ul>
        <li v-for="val in data" track-by="id">
            {{val}}
        </li>
    </ul>
</div>
</body>
<script>
    var app = new Vue({
        el:'#box',
        data: {
           data:['apple','orange']
        },
        methods:{
            add:function(){
                this.data.push('tomato');
            }
        }
    });
    app.$mount('#box');
</script>
</html>